package com.ruoyi.system.domain;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

/**
 * 动态评论实体
 *
 * 说明：包含最基础展示所需字段，后续可根据需要扩展
 */
@ApiModel(value = "PostComment", description = "动态评论实体")
@Data
@TableName("post_comments")
public class PostComment {
    @ApiModelProperty("主键ID")
    @Excel(name = "ID")
    private Long id;

    @ApiModelProperty("帖子ID")
    @Excel(name = "帖子ID")
    private Long postId;

    @ApiModelProperty("用户ID")
    @Excel(name = "用户ID")
    private String userId;

    @ApiModelProperty("评论内容")
    @Excel(name = "评论内容")
    private String content;

    @ApiModelProperty("父评论ID")
    private Long parentId;

    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createdAt;

    @ApiModelProperty("用户名称")
    private String userName;

    @ApiModelProperty("用户头像")
    private String avatar;


}
